@(paymentLoginForm: Form[PaymentLoginForm], session: MovieSession, seats: Array[String])(implicit lang: Lang)

@import helper._
@implicitFieldConstructor = @{ FieldConstructor(bootstrap.render) }

@main("The Cult Cinema Inc. Login "){

	<section style="padding-top:120px">
				<div class="row">
					<div class="span12">
						<ul class="breadcrumb">
							<li><a href="@routes.Application.index(lang.code)">@Messages("home")(lang)</a> <span class="divider">/</span></li>
							<li><a href="@routes.MovieManager.list(lang.code)">@Messages("movie")(lang)</a> <span class="divider">/</span></li>
							<li><a href="@routes.MovieManager.detail(session.movie.id, lang.code)">@session.movie.infos.get(0).name</a> <span class="divider">/</span></li>
							<li><a href="@routes.MovieManager.session(session.id, lang.code)">@Messages("movie.seating")(lang)</a> <span class="divider">/</span></li>
		        			<li class="active">@Messages("login")(lang)</li>
		        		</ul>
					</div>
				</div>

				<div class="row">
					<div class="span12">
				    	<div class="alert-info alert alert-block">
				    		<h4 class="alert-heading">
								<i class="icon-question-sign"></i> @Messages("movie.payment.login.info")(lang)
							</h4>
						</div>
					</div>
				</div>

				@if(paymentLoginForm.hasErrors) {
					<div class="row">
						<div class="span12">
				    	    <div class="alert-error alert alert-block">
				    	    	<h4 class="alert-heading">ERROR
					    	    	@if(paymentLoginForm.hasGlobalErrors) { # @paymentLoginForm.globalError.message }
				    	    	</h4>
					    	</div>
						</div>
					</div>
				}

				<div class="row">
			    	<div class="span6">
					    @helper.form(action = routes.MovieManager.paymentLogin, 'class -> "form-horizontal well") {
							<h4><i class="icon-user"></i>  @Messages("movie.payment.login.haveAC")(lang)</h4>
							<br />

					        <fieldset>
					            @inputText(
					                paymentLoginForm("username"),
					                '_label -> Messages("username")(lang),
					                '_help -> "Please choose a valid email.",
					                '_error -> paymentLoginForm.globalError
					            )

					            @inputPassword(
					                paymentLoginForm("password"),
					                '_label -> Messages("password")(lang),
					                '_help -> "A password must be at least 6 characters. "
					            )

								<input type="hidden" name="seats" value="@seats(0)@for(i <- 1 to seats.length-1){:@seats(i)}">
					            <input type="hidden" name="session" value="@session.id">
					            <input type="hidden" name="language" value="@lang.code">


					        </fieldset>

					        <div class="form-actions">
					        	<button type="submit" class="btn btn-primary">@Messages("login")(lang)</button>
					        	<button type="reset" class="btn">@Messages("login.reset")(lang)</button>
					        </div>
					    }

					</div>
					<div class="span6">

						<div class="well">
						<h4><i class="icon-group"></i>  @Messages("movie.payment.login.notMember")(lang)</h4>
						<p>@Messages("movie.payment.login.notMemberMsg")(lang)
						</p>
						<h5>@Messages("register.join")(lang)</h5>
						<a href="@routes.Member.join()?lang=@lang.code" class="btn btn-block btn-large btn-success">@Messages("register")(lang)</a>
						<hr>
						@helper.form(action = routes.MovieManager.payment) {
							<input type="hidden" name="session" value="@session.id">
							<input type="hidden" name="language" value="@lang.code">
							<input type="hidden" id="seats" name="seats" value="@seats(0)@for(i <- 1 to seats.length-1){:@seats(i)}">
							<input type="hidden" id="bypassLogin" name="bypassLogin" value="1">
							<button id="continue" type="submit" class="btn btn-block btn-large btn-primary">@Messages("movie.payment.login.proceedWithoutLogin")(lang)</button>
						}
						</div>

			    </div>
			</section>

}(lang)
